import request from '@/utils/request'
import request2,{getdata} from '@/utils/seleRequest'




export function queryCountGroupByArea(data) {
  let select = 'srvjk_expert_cnt_area_select'
  let condition = []
  // if(data.startTime){
  // condition =[{
  //   "colName": "release_date",
  //   "ruleType": "lt",
  //   "value": data.endTime
  // },{
  //   "colName": "release_date",
  //   "ruleType": "gt",
  //   "value": data.startTime
  // }]}
  return request2({
      url: `/${select}?${select}`,
      method: 'post',
      data:getdata(select,condition)
  })
}



export function queryCountGroupByYear(data) {

  let select = 'srvjk_expert_cnt_year_select'
  let condition = []
  // if(data.startTime){
  // condition =[{
  //   "colName": "release_date",
  //   "ruleType": "lt",
  //   "value": data.endTime
  // },{
  //   "colName": "release_date",
  //   "ruleType": "gt",
  //   "value": data.startTime
  // }]}
  return request2({
      url: `/${select}?${select}`,
      method: 'post',
      data:getdata(select,condition)
  })
}



export function queryGroupByDependency(data) {
  let select = 'srvjk_expert_cnt_area_select'
  let condition = []
  // if(data.startTime){
  // condition =[{
  //   "colName": "release_date",
  //   "ruleType": "lt",
  //   "value": data.endTime
  // },{
  //   "colName": "release_date",
  //   "ruleType": "gt",
  //   "value": data.startTime
  // }]}
  return request2({
      url: `/${select}?${select}`,
      method: 'post',
      data:getdata(select,condition)
  })
}

export function queryGroupByYear(data) {
  let select = 'srvjk_expert_cnt_year_select'
  let condition = []
  // if(data.startTime){
  // condition =[{
  //   "colName": "release_date",
  //   "ruleType": "lt",
  //   "value": data.endTime
  // },{
  //   "colName": "release_date",
  //   "ruleType": "gt",
  //   "value": data.startTime
  // }]}
  return request2({
      url: `/${select}?${select}`,
      method: 'post',
      data:getdata(select,condition)
  })


}

export function expertWorksNumReprt(data) {

  let select = 'srvjk_expert_cnt_pub_top_select'
  let condition = []
  // if(data.startTime){
  // condition =[{
  //   "colName": "release_date",
  //   "ruleType": "lt",
  //   "value": data.endTime
  // },{
  //   "colName": "release_date",
  //   "ruleType": "gt",
  //   "value": data.startTime
  // }]}
  return request2({
      url: `/${select}?${select}`,
      method: 'post',
      data:getdata(select,condition)
  })

}

export function expertWorksViewsReprt(data) {
  let select = 'srvjk_expert_cnt_view_top_select'
  let condition = []
  // if(data.startTime){
  // condition =[{
  //   "colName": "release_date",
  //   "ruleType": "lt",
  //   "value": data.endTime
  // },{
  //   "colName": "release_date",
  //   "ruleType": "gt",
  //   "value": data.startTime
  // }]}
  return request2({
      url: `/${select}?${select}`,
      method: 'post',
      data:getdata(select,condition)
  })
}

export function expertWorksCollectionNumReprt(data) {
  let select = 'srvjk_expert_cnt_collect_top_select'
  let condition = []
  // if(data.startTime){
  // condition =[{
  //   "colName": "release_date",
  //   "ruleType": "lt",
  //   "value": data.endTime
  // },{
  //   "colName": "release_date",
  //   "ruleType": "gt",
  //   "value": data.startTime
  // }]}
  return request2({
      url: `/${select}?${select}`,
      method: 'post',
      data:getdata(select,condition)
  })

}